'Try it!' and Supported authorization techniques
  • 19 Mar 2024
  • 2 Minuten te lezen
  • Bijdragers
  • Donker
    Licht

'Try it!' and Supported authorization techniques

  • Donker
    Licht

The content is currently unavailable in Dutch. You are viewing the default English version.
Samenvatting van het artikel

The Try it! option allows developers to test the API endpoints directly from the documentation. It typically provides an interactive interface where developers can enter the required parameters for a particular API endpoint and see the resulting response with code samples.

The servers must be defined in the specification file to use the Try it! option.


Supported authorization techniques

The following are the different types of authorization techniques that are supported in Document360's API documentation feature.

What is 'authorization' in the context of API?

Authorization is a process by which a user gains access to an API based on specific credentials.

  • HTTP authentication
    • Basic
    • Bearer
  • API key
  • OAuth2
    • Authorization flow
    • Authorization flow with PKCE
    • Client Credentials flow
    • Implicit flow
  • OpenID Connect

Things to consider in OAuth2 and OpenID authorization

Redirect URI

A redirect URI (Uniform Resource Identifier) is a specific endpoint or URL a web application uses to redirect users after completing an authorization grant flow or authentication process.

Ensure that you set the redirect URI in the following format: domain/oauth

Example: https://apidocs.document360.com/oauth

Silent renewal

When the user has authenticated and performing actions with Try it! Option, the authorization may expire after a certain time. To overcome this scenario, we perform automatic renewal of the refresh token without requiring the user to log in again.


Why is the Try-it feature not appearing for me?

One possible reason is that the server variable
(URL) is not defined in the specification file.


How is the API documentation feature intuitive and interactive for the users?

API documentation feature assists the developers by providing various validations in the parameters and body parameters fields. This feature offers the following validations for a better user experience:

  • Required - Validates the data requirement

Example: For a mandatory field, it indicates this requirement with the 'Required' text.

  • Type - Validates the specific data type

Example: For fields that support only boolean input, it indicates this type with the 'Boolean' text.

  • Pattern - Validates the input in certain fields against specific patterns

Example: An email field must be in the format of 'email_id@domain', and any incorrect format is flagged as an error.

  • MinLength - Validates the input has the minimum number of characters
  • MaxLength - Validates the input has the maximum number of characters
  • MinValue - Validates the input specified is greater than the minimum value
  • MaxValue -  Validates the input specified is less than the maximum value

To further enhance the user experience, the API documentation also offers the option to ''Use default value'' in the fields.


Test API Endpoints Directly from Documentation with Try it Feature


Introducing API Documentation: Enhance your API Experience - Click to read


Was dit artikel nuttig?

ESC

Eddy AI, die het ontdekken van kennis vergemakkelijkt door middel van conversationele intelligentie